package edu.wust;

import java.math.BigInteger;

public class exam48 {

    public static void main(String[] args) {
    //答案：9110846700
        BigInteger sum=BigInteger.ZERO;
        for(int i=1;i<=1000;++i){
            BigInteger t=new BigInteger(String.valueOf(i));
            BigInteger n=BigInteger.ONE;
            for(int j=1;j<=i;++j){
                n=n.multiply(t);
            }
            sum=sum.add(n);
        }
        String s=sum.toString();
        int len=s.length(),end=len-9;
        for(int i=end-1;i<=len-1;++i)
            System.out.print(s.charAt(i));
    }
}

